package com.qf.pubmed;


import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.scheduling.annotation.EnableAsync;


@ComponentScan(basePackages = {"com.qf"})
@MapperScan("com.qf.database")
@SpringBootApplication()
@ServletComponentScan
@EnableAsync
public class PubmedApplication extends SpringBootServletInitializer {
    public static void main(String[] args) {
        SpringApplication.run(PubmedApplication.class, args);
    }

    @Override
    protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
        //此处的Application.class为带有@SpringBootApplication注解的启动类
        return builder.sources(PubmedApplication.class);
    }
}


